package progetto6.jade;

public class MassiveRetaliatoryStrikeStrategy extends ScoreIndependentStrategy {

	private static final long serialVersionUID = 73259517851537380L;
	private int lastEsit = -1;
	private boolean isSetted = false;

	@Override
	public Choice getNext() {
		if(isSetted){
			return lastChoice;
		}
		if(lastEsit == 0){
			lastChoice = Choice.C;
			isSetted = true;
		}else{
			lastChoice = Choice.D;
		}
		return lastChoice;
	}

	@Override
	public String toString() {
		return "MassiveRetaliatoryStrikeStrategy";
	}

	@Override
	public void esit(int value) {
		super.esit(value);
		lastEsit = value;
	}
}
